<template>
  <section>
    <h1>个人信息展示</h1>
    <div>姓名：{{name}}</div>
    <div>方向：{{direction}}</div>
    <div>格言：{{motto}}</div>
    <div>联系方式
      <div v-for="(x) in address">{{x}}</div>
    </div>
    <div>关于页内容：{{content}}</div>
  </section>
</template>
<script>
import {getAbout} from '../../api/api'

export default {
  data () {
    return {
      direction: '',
      content: '',
      motto: '',
      name: '',
      address: []
    }
  },
  methods: {
    Init () {
      getAbout().then(
        data => {
          this.direction = data.direction
          this.content = data.content
          this.motto = data.motto
          this.name = data.name
          this.address = data.address
        }
      ).catch()
    }
  },
  mounted () {
    this.Init()
  }
}
</script>
